# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import redis   # 导入redis模块，通过python操作redis 也可以直接在redis主机的服务端操作缓存数据库
from django.test import TestCase

# Create your tests here.
news=dict()
news["relativity"]="" #相关度
news["time"]=""#时间
news["content"]=""#内容
news["title"]=""#标题
news["keywords"]=""#关键词
news["conment_num"]=""#评论数
news["commendatory_num"]=""#褒义评论数
news["snippet"]=""
news["url"]=""#网页链接
news["relativity_news"]=""#相关新闻
news["preview"]=""#预览

r_server=redis.Redis(host="localhost",port=6379)
# r = redis.Redis(host='127.0.0.1',port=6609,db=0)
r_server.set('hello','world')
print(r_server.get('aaa'))